package com.itqf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itqf.entity.SysMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/10/20
 * @Time: 上午9:31
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    public List<SysMenu> findDirByUid(Long uid);

    public List<SysMenu> findMenuByUidAndParentId(@Param("uId") Long uid,
                                                  @Param("parentId") long parentId);

    //offset  limit
    //current pageSize    offset = (current-1)*pageSize
    //current = offset/pageSize+1
     //IPage<T> selectPage(IPage<T> var1, @Param("ew") Wrapper<T> var2);
    public List<SysMenu> findMenuByPage(@Param("limit")int limit,@Param("offset")int offset,
                                         @Param("order") String order,@Param("search")String search);
    public int  findMenuTotal(@Param("search") String search);

// permissions:["","",""]
    public   List<String> findPermsByUid(long uid);


    public   List<SysMenu>  findMenuTree();


    public  int  add(SysMenu sysMenu);

    public  int  del(List<Long> ids);


}
